package org.fuys.coder.domain.model.repository;

import org.fuys.coder.infrastructure.model.dto.UserModelDTO;
import org.fuys.coder.common.entity.Pair;
import org.springframework.data.redis.core.ZSetOperations;

import java.util.List;
import java.util.Set;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.model.repository
 * @className: IUserModelRepository
 * @author: WangJing
 * @description: 用户模型管理仓储服务
 * @date: 2024/6/26 16:58
 * @version: 1.0
 */
public interface IUserModelRepository {
    //获取分类的信息来推荐 较粗略
    public List<UserModelDTO> getRoughModel(Integer userId);

    void saveUserModel(Integer userId,List<Pair<Integer, Double>> collect);

    Set<ZSetOperations.TypedTuple<Object>> getExpiredModel(String redisKey, int i);

    void addModelExpired(String redisUserModelKey, Integer userId, double time);

    void addCacheUserWeights(String redisKey, Pair<Integer, Double> integerDoublePair);

    void cacheUserWeights(String redisKey, List<Pair<Integer, Double>> collect);

    List<Object> getCacheWeightPair(String redisKey);
}
